﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;

namespace mBlog.Admin.ViewModels
{
    public class PostInput
    {
        [HiddenInput]
        public int Id { get; set; }

        [Required]
        [Display(Name = "Title")]
        public string Title { get; set; }

        [Required]
        [Display(Name = "UrlName")]
        public string UrlName { get; set; }

        [Required]
        [Display(Name = "Category")]
        public string CategoryUrlName { get; set; }

        [AllowHtml]
        [Required]
        [Display(Name = "Excerpt")]
        [DataType(DataType.MultilineText)]
        public string Excerpt { get; set; }

        [AllowHtml]
        [Required]
        [Display(Name = "Content")]
        [DataType(DataType.MultilineText)]
        public string Content { get; set; }

        [Display(Name = "Posted Time")]
        [DataType(DataType.DateTime)]
        public DateTime PostedTime { get; set; }

        public bool IsPublished { get; set; }

        [Display(Name = "Published Time")]
        [DataType(DataType.DateTime)]
        public DateTime? PublishedTime { get; set; }

        [Display(Name = "Tags")]
        public string Tags { get; set; }

    }
}